feat(NodOn): add SEM-4-1-00 energy reset, configureReporting and apparent power#12548
feat(NodOn): add SEM-4-1-00 energy reset, configureReporting and apparent power#12548nthiers wants to merge 3 commits into
Conversation
9c49105 to
c4817bd
Compare
| configure: async (device, coordinatorEndpoint) => { | ||
| const endpoint = device.getEndpoint(1); | ||
|
|
||
| // Explicit bind — not done by m.electricityMeter because configureReporting: false |
There was a problem hiding this comment.
Why do we not set configureReporting: true?
There was a problem hiding this comment.
During my tests with the external converter, I observed that a single configureReporting call with 6+ haElectricalMeasurement attributes returns status=FAIL on our device. Splitting into batches of ≤ 5 attributes solved that.
The custom configure also reads multiplier/divisor attributes before the first configureReporting call, so ZHC has the correct scaling factors cached when the first reports arrive.
There was a problem hiding this comment.
During my tests with the external converter, I observed that a single configureReporting call with 6+ haElectricalMeasurement attributes returns status=FAIL on our device. Splitting into batches of ≤ 5 attributes solved that.
For this I propose to add an argument to m.electricityMeter to change this behaviour.
so ZHC has the correct scaling factors cached when the first reports arrive.
I think we should also do this in the m.electricityMeter , read divisor/multiplier before doing the configureReporting
Problem
The existing entry uses
m.electricityMeter()without aconfigurefunction.As a result:
load). A future firmware update will implement threshold-based reporting natively, using the
same thresholds as defined in this PR.
energy_resetcapabilityapparentPowerandacFrequencymissing fromconfigureReportingFix
configurewith manual bind, multiplier reads, and batchedconfigureReportingenergy_resetviagenBasic/resetFactDefaultm.identify()Why
configureReporting: false+ explicit configureWithout
configure, the device uses factory-default reporting (~5 s for all attributes).With threshold-based reporting, ×63 fewer messages were observed on a stable circuit.
Manual bind is required because
m.electricityMeter({ configureReporting: false })skips itsown bind/configure step entirely.
Multiplier attributes (
acVoltageMultiplier/Divisor,acCurrentMultiplier/Divisor,acPowerMultiplier/Divisor,acFrequencyMultiplier/Divisor) are read beforeconfigureReportingso ZHC has them in cluster cache to scale the first received reports.haElectricalMeasurement configureReportingis split into batches of ≤5 attributes: a singlecall with 6 attributes exceeds the ~85-byte ZCL frame limit and returns
status=FAIL.Why
energy_resetviagenBasic/resetFactDefaultThis is the only counter-reset mechanism available in the current firmware.
resetFactDefaultresets all cluster attributes to factory defaults — it does not affect Zigbee network membership,
bindings, or
configureReporting(ZCL spec).Tested
voltage,current,power,power_apparent,ac_frequency,power_factor,energy,produced_energyconfirmed workingenergy_resetconfirmed workingidentifyconfirmed working